# coding=utf-8

import pymongo

myclient = pymongo.MongoClient("mongodb://localhost:27017/")
mydb = myclient["test"]
mycol = mydb["sites"]
mydict = {"name": "test", "alexa": "10000", "url": "https://www.runoob.com"}

x = mycol.insert_one(mydict)
print(x)
print(x)
# my_list = myclient.list_database_names()
# print(my_list)
# if 'runoobdb' in my_list:
#     print("--------")

